package com.automannn.springboot.practice.applicationProperties;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author automannn
 * @Date 2022/2/22
 */

@SpringBootApplication
public class ApplicationPropertiesTest {

    public static void main(String[] args) {
      ConfigurableApplicationContext applicationContext= SpringApplication.run(ApplicationPropertiesTest.class);

        System.out.println(applicationContext.getEnvironment().getProperty("myName"));
    }
}
